package com.ops.service.ns.system.implementation;

import java.io.Serializable;
import java.util.logging.Logger;
import com.ops.schema.ns.system.LoginRequest;
import com.ops.schema.ns.system.LoginResponse;
import com.ops.schema.ns.system.LogoutRequest;
import com.ops.schema.ns.system.LogoutResponse;
import com.ops.schema.ns.system.RetrieveMenuRequest;
import com.ops.schema.ns.system.RetrieveMenuResponse;
import com.ops.schema.ns.system.UpdateEmployerRequest;
import com.ops.schema.ns.system.UpdateEmployerResponse;
import com.ops.schema.ns.system.SearchParametersRequest;
import com.ops.schema.ns.system.SearchParametersResponse;
import com.ops.schema.ns.system.UpdateParametersRequest;
import com.ops.schema.ns.system.UpdateParametersResponse;
import com.ops.schema.ns.system.SearchMessagesRequest;
import com.ops.schema.ns.system.SearchMessagesResponse;
import com.ops.schema.ns.system.UpdateMessagesRequest;
import com.ops.schema.ns.system.UpdateMessagesResponse;
import com.ops.schema.ns.system.SearchLookUpsRequest;
import com.ops.schema.ns.system.SearchLookUpsResponse;
import com.ops.schema.ns.system.UpdateLookUpsRequest;
import com.ops.schema.ns.system.UpdateLookUpsResponse;
import com.ops.schema.ns.system.SearchRulesRequest;
import com.ops.schema.ns.system.SearchRulesResponse;
import com.ops.schema.ns.system.UpdateRulesRequest;
import com.ops.schema.ns.system.UpdateRulesResponse;
import com.ops.schema.ns.system.SearchRuleBindsRequest;
import com.ops.schema.ns.system.SearchRuleBindsResponse;
import com.ops.schema.ns.system.SearchRuleRatesRequest;
import com.ops.schema.ns.system.SearchRuleRatesResponse;
import com.ops.schema.ns.system.UpdateRuleRatesRequest;
import com.ops.schema.ns.system.UpdateRuleRatesResponse;
import com.ops.schema.ns.system.SearchUserSessionsRequest;
import com.ops.schema.ns.system.SearchUserSessionsResponse;
import com.ops.schema.ns.system.SearchUsersRequest;
import com.ops.schema.ns.system.SearchUsersResponse;
import com.ops.schema.ns.system.UpdateUsersRequest;
import com.ops.schema.ns.system.UpdateUsersResponse;
import com.ops.schema.ns.system.SearchUserActionsRequest;
import com.ops.schema.ns.system.SearchUserActionsResponse;
import com.ops.schema.ns.system.SearchTaxAuthoritiesRequest;
import com.ops.schema.ns.system.SearchTaxAuthoritiesResponse;
import com.ops.schema.ns.system.UpdateTaxAuthoritiesRequest;
import com.ops.schema.ns.system.UpdateTaxAuthoritiesResponse;
import com.ops.schema.ns.system.RetrieveRolesRequest;
import com.ops.schema.ns.system.RetrieveRolesResponse;

import com.ops.service.ns.system.controller.OPSController;
import com.ops.service.ns.system.FaultMessage;
import com.ops.service.ns.system.OnlinePayrollSystemService;
import com.ops.service.ns.system.config.ApplicationContextProvider;
import com.ops.schema.ns.system.ServiceResult;
import com.ops.service.ns.system.exception.OPSException;
import com.ops.service.ns.system.exceptionhandler.ExceptionHandler;

@javax.jws.WebService(endpointInterface = "com.ops.service.ns.system.OnlinePayrollSystemService",
        wsdlLocation = "/OnlinePayrollSystemService.wsdl",
        serviceName = "OnlinePayrollServices",
        targetNamespace = "http://service.ops.com/ns/system",        
        portName = "OnlinePayrollSystemServiceSOAP")

public class OnlinePayrollSystemServiceImpl implements OnlinePayrollSystemService, Serializable {

    private static final long serialVersionUID = 3370367844977691546L;
    private static final Logger LOG_IMPL = Logger.getLogger(OnlinePayrollSystemServiceImpl.class.getName());
	private OPSController controller = null;  	
    public OnlinePayrollSystemServiceImpl() {
		controller = (OPSController)ApplicationContextProvider.getApplicationContext().getBean("onlinePayrollSystemController");
    }
    
    public LoginResponse login(LoginRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside login method::Impl ");
    	LoginResponse response = null;
       	try{
    		response = controller.login(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}    	
    	LOG_IMPL.info("Exit login method::Impl ");
    	
   		return response;
    }   
    
    public LogoutResponse logout(LogoutRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside logout method::Impl ");
    	LogoutResponse response = null;
       	try{
    		response = controller.logout(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}    	
    	LOG_IMPL.info("Exit logout method::Impl ");
    	
   		return response;
    }    
    
    public RetrieveMenuResponse retrieveMenu(RetrieveMenuRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside retrieveMenu method::Impl ");
    	RetrieveMenuResponse response = null;
       	try{
    		response = controller.retrieveMenu(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}    	
    	LOG_IMPL.info("Exit retrieveMenu method::Impl ");
    	
   		return response;
    }  
    
    public UpdateEmployerResponse updateEmployer(UpdateEmployerRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateEmployer method::Impl ");
    	UpdateEmployerResponse response = null;
       	try{
    		response = controller.updateEmployer(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}    	
    	LOG_IMPL.info("Exit updateEmployer method::Impl ");
    	
   		return response;
    }    

    public SearchParametersResponse searchParameters(SearchParametersRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchEmployer method::Impl ");
    	SearchParametersResponse response = null;
       	try{
    		response = controller.searchParameters(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}	
    	LOG_IMPL.info("Exit searchEmployer method::Impl ");
    	
   		return response;
    }    

    public UpdateParametersResponse updateParameters(UpdateParametersRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateParameters method::Impl ");
    	UpdateParametersResponse response = null;
       	try{
    		response = controller.updateParameters(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}   	
    	LOG_IMPL.info("Exit updateParameters method::Impl ");
    	
   		return response;
    }  
    
    public SearchMessagesResponse searchMessages(SearchMessagesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchMessages method::Impl ");
    	SearchMessagesResponse response = null;
       	try{
    		response =controller.searchMessages(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}	
    	LOG_IMPL.info("Exit searchMessages method::Impl ");
    	
   		return response;
    }    

    public UpdateMessagesResponse updateMessages(UpdateMessagesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateMessages method::Impl ");
    	UpdateMessagesResponse response = null;
       	try{
    		response = controller.updateMessages(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}   	
    	LOG_IMPL.info("Exit updateMessages method::Impl ");
    	
   		return response;
    } 
    
    public SearchLookUpsResponse searchLookups(SearchLookUpsRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchLookup method::Impl ");
    	SearchLookUpsResponse response = null;
       	try{
    		response =controller.searchLookups(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}	
    	LOG_IMPL.info("Exit searchLookup method::Impl ");
    	
   		return response;
    }    

    public UpdateLookUpsResponse updateLookups(UpdateLookUpsRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateLookup method::Impl ");
    	UpdateLookUpsResponse response = null;
       	try{
    		response = controller.updateLookups(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}   	
    	LOG_IMPL.info("Exit updateLookup method::Impl ");
    	
   		return response;
    }  
    
    public SearchRulesResponse searchRules(SearchRulesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchRules method::Impl ");
    	SearchRulesResponse response = null;
       	try{
    		response =controller.searchRules(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}	
    	LOG_IMPL.info("Exit searchRules method::Impl ");
    	
   		return response;
    }    

    public UpdateRulesResponse updateRules(UpdateRulesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateRules method::Impl ");
    	UpdateRulesResponse response = null;
       	try{
    		response = controller.updateRules(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}   	
    	LOG_IMPL.info("Exit updateRules method::Impl ");
    	
   		return response;
    } 

    public SearchRuleBindsResponse searchRuleBinds(SearchRuleBindsRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchRuleBinds method::Impl ");
    	SearchRuleBindsResponse response = null;
       	try{
    		response =controller.searchRuleBinds(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit searchRuleBinds method::Impl ");
    	
   		return response;
    }    
    
    
    public SearchRuleRatesResponse searchRuleRates(SearchRuleRatesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchRuleRates method::Impl ");
    	SearchRuleRatesResponse response = null;
    	try{
    		response =controller.searchRuleRates(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit searchRuleRates method::Impl ");
    	
   		return response;
    }    

    public UpdateRuleRatesResponse updateRuleRates(UpdateRuleRatesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateRuleRates method::Impl ");
    	UpdateRuleRatesResponse response = null;
    	try{
    		response = controller.updateRuleRates(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} 	
    	LOG_IMPL.info("Exit updateRuleRates method::Impl ");
    	
   		return response;
    } 

    public SearchUserSessionsResponse searchUserSessions(SearchUserSessionsRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchUserSessions method::Impl ");
    	SearchUserSessionsResponse response = null;
    	try{
    		response =controller.searchUserSessions(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit searchUserSessions method::Impl ");
    	
   		return response;
    }    

    public SearchUsersResponse searchUsers(SearchUsersRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchUsers method::Impl ");
    	SearchUsersResponse response = null;
    	try{
    		response =controller.searchUsers(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit searchUsers method::Impl ");
    	
   		return response;
    }    

    public UpdateUsersResponse updateUsers(UpdateUsersRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateUsers method::Impl ");
    	UpdateUsersResponse response = null;
    	try{
    		response =controller.updateUsers(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit updateUsers method::Impl ");
    	
   		return response;
    }    

    public SearchUserActionsResponse searchUserActions(SearchUserActionsRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchUserActions method::Impl ");
    	SearchUserActionsResponse response = null;
    	try{
    		response =controller.searchUserActions(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit searchUserActions method::Impl ");
    	
   		return response;
    }    

    public SearchTaxAuthoritiesResponse searchTaxAuthorities(SearchTaxAuthoritiesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside searchTaxAuthorities method::Impl ");
    	SearchTaxAuthoritiesResponse response = null;
    	try{
    		response =controller.searchTaxAuthorities(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit searchTaxAuthorities method::Impl ");
    	
   		return response;
    }    

    public UpdateTaxAuthoritiesResponse updateTaxAuthorities(UpdateTaxAuthoritiesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside updateTaxAuthorities method::Impl ");
    	UpdateTaxAuthoritiesResponse response = null;
    	try{
    		response =controller.updateTaxAuthorities(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit updateTaxAuthorities method::Impl ");
    	
   		return response;
    }    

    public RetrieveRolesResponse retrieveRoles(RetrieveRolesRequest parameters) throws FaultMessage{
    	LOG_IMPL.info("Inside retrieveRoles method::Impl ");
    	RetrieveRolesResponse response = null;
    	try{
    		response =controller.retrieveRoles(parameters);
    	} catch(OPSException ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	} catch(Exception ex) {
    		throw ExceptionHandler.generateFaultMessage(ex);
    	}
    	LOG_IMPL.info("Exit retrieveRoles method::Impl ");
    	
   		return response;
    }    
}